package com.foftact.etf;

import com.foftact.Foftact;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.testng.Assert;
import org.testng.annotations.Test;

import java.util.List;

@SpringBootTest(classes= Foftact.class)
public class ETFListTestng extends AbstractTestNGSpringContextTests {

    @Autowired
    ETFListService etfListService;

    @Test
    public void test() throws Exception {
        etfListService.fetchAndSaveETFListData();
        List<ETFList> allETFList = etfListService.getAllETFList();
        Assert.assertTrue(allETFList.size() > 1200);
    }

}
